home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C/C++ Users Group Library 1996 July
/
C-C++ Users Group Library July 1996.iso
/
vol_200
/
273_01
/
triml.cc
< prev
next >
Wrap
Text File
|
1987-09-26
|
505b
|
20 lines
trim_l(char *str)
/* This will remove all blanks from the left side of the string
pointed to by *str.
*/
{
int non_blank_found = 0;
char *newstr;
newstr=str;
while(*str) {
if(*str==' ' && !non_blank_found)
str++;
else {
non_blank_found=1;
*newstr=*str;
newstr++; str++;
}
}
*newstr=0x00;
}